I am trying to create an image to run api(fastapi) in docker and the software that i am using in api requires ubuntu 16.04 while I am trying to install python packages I am getting "No matching distribution found for fastapi " error while other packages are being correctly installed. Here is my Docker file code
FROM ubuntu:16.04
LABEL maintainer="sai"
COPY ./app /api/api
COPY requirements.txt ./requirements.txt
RUN apt-get update \
&& apt install python3-pip -y \
&& pip3 install --upgrade pip==20.0.1 \
&& pip install -r requirements.txt
RUN apt-get update && \
apt-get install -y --no-install-recommends \
g++ \
make \
automake \
autoconf \
bzip2 \
unzip \
wget \
sox \
libtool \
git \
subversion \
python2.7 \
python3 \
zlib1g-dev \
gfortran \
ca-certificates \
patch \
ffmpeg \
vim && \
rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/bin/python2.7 /usr/bin/python
#other toolkit installation commands
ENV PYTHONPATH=/api
WORKDIR /api
EXPOSE 8000
ENTRYPOINT ["uvicorn"]
CMD ["api.main:app", "--host", "0.0.0.0"]
I am new to docker so excuse me for my mistakes. I have a working api i need to dockerize it also the api involves creating and deleting file and folders is this ok with Docker?
Note I also tried upgrading pip to latest version but didn't work any pointers to further helpful resources in dockerizing the api are most welcome